# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=gsettings-qt
pkgver=0.2_git20220807
_commit="d5e002d7e0bce46c315bcc99a44a8bd51f49f488"
pkgrel=0
pkgdesc="Library to access GSettings from Qt"
url="https://gitlab.com/ubports/development/core/gsettings-qt"
arch="all"
license="LGPL-3.0-only"
depends_dev="qt5-qtdeclarative-dev"
makedepends="$depends_dev qt5-qtbase-dev"
checkdepends="xvfb-run"
subpackages="$pkgname-dev"
source="https://gitlab.com/ubports/development/core/gsettings-qt/-/archive/$_commit/gsettings-qt-$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"

build() {
	qmake-qt5
	make
}

check() {
	LD_LIBRARY_PATH=../src GSETTINGS_BACKEND=memory GSETTINGS_SCHEMA_DIR=. xvfb-run make check
}

package() {
	make INSTALL_ROOT="$pkgdir" install
}

sha512sums="
ead1c8fe4e050fe3b9a6f3881dbfda54e172b01948d59c52536ceb35e244222d75803849565d32e46bc80f9a1651abbeff545141a71545547252ce8786222175  gsettings-qt-d5e002d7e0bce46c315bcc99a44a8bd51f49f488.tar.gz
"
